package ktc.cn.ktc_base.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "tb_ul", schema = "ktc_base", catalog = "")
@IdClass(TbUlPK.class)
public class TbUl {
    private String userid;
    private String labelid;

    @Id
    @Column(name = "userid")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Id
    @Column(name = "labelid")
    public String getLabelid() {
        return labelid;
    }

    public void setLabelid(String labelid) {
        this.labelid = labelid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbUl tbUl = (TbUl) o;
        return Objects.equals(userid, tbUl.userid) &&
                Objects.equals(labelid, tbUl.labelid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userid, labelid);
    }
}
